package it.unibo.iss.domotica.parser.antlr.internal; 

import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.xtext.parsetree.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.common.util.Enumerator;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import org.eclipse.xtext.conversion.ValueConverterException;
import it.unibo.iss.domotica.services.DomoticDslGrammarAccess;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings("all")
public class InternalDomoticDslParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_DOUBLE", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'DomoticSystem'", "';'", "'package'", "'propertiesPath='", "'Elettrodomestico'", "'consumption='", "'usage='", "'Sensor'", "'for'", "'minConsumption='", "'maxConsumption='", "'LOW'", "'MEDIUM'", "'HIGH'", "'ESSENTIAL'", "'OPTIONAL'"
    };
    public static final int RULE_ID=4;
    public static final int RULE_STRING=5;
    public static final int RULE_ANY_OTHER=11;
    public static final int RULE_INT=7;
    public static final int RULE_WS=10;
    public static final int RULE_SL_COMMENT=9;
    public static final int EOF=-1;
    public static final int RULE_DOUBLE=6;
    public static final int RULE_ML_COMMENT=8;

        public InternalDomoticDslParser(TokenStream input) {
            super(input);
        }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g"; }



     	private DomoticDslGrammarAccess grammarAccess;
     	
        public InternalDomoticDslParser(TokenStream input, IAstFactory factory, DomoticDslGrammarAccess grammarAccess) {
            this(input);
            this.factory = factory;
            registerRules(grammarAccess.getGrammar());
            this.grammarAccess = grammarAccess;
        }
        
        @Override
        protected InputStream getTokenFile() {
        	ClassLoader classLoader = getClass().getClassLoader();
        	return classLoader.getResourceAsStream("it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.tokens");
        }
        
        @Override
        protected String getFirstRuleName() {
        	return "System";	
       	}
       	
       	@Override
       	protected DomoticDslGrammarAccess getGrammarAccess() {
       		return grammarAccess;
       	}



    // $ANTLR start entryRuleSystem
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:78:1: entryRuleSystem returns [EObject current=null] : iv_ruleSystem= ruleSystem EOF ;
    public final EObject entryRuleSystem() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleSystem = null;


        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:79:2: (iv_ruleSystem= ruleSystem EOF )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:80:2: iv_ruleSystem= ruleSystem EOF
            {
             currentNode = createCompositeNode(grammarAccess.getSystemRule(), currentNode); 
            pushFollow(FOLLOW_ruleSystem_in_entryRuleSystem75);
            iv_ruleSystem=ruleSystem();
            _fsp--;

             current =iv_ruleSystem; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleSystem85); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleSystem


    // $ANTLR start ruleSystem
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:87:1: ruleSystem returns [EObject current=null] : ( 'DomoticSystem' ( (lv_name_1_0= RULE_ID ) ) ( (lv_package_2_0= rulePackage ) )? ';' ( (lv_properties_4_0= ruleProperties ) )? ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )* ( (lv_sensors_6_0= ruleSensor ) )* ) ;
    public final EObject ruleSystem() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        EObject lv_package_2_0 = null;

        EObject lv_properties_4_0 = null;

        EObject lv_elettrodomestico_5_0 = null;

        EObject lv_sensors_6_0 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:92:6: ( ( 'DomoticSystem' ( (lv_name_1_0= RULE_ID ) ) ( (lv_package_2_0= rulePackage ) )? ';' ( (lv_properties_4_0= ruleProperties ) )? ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )* ( (lv_sensors_6_0= ruleSensor ) )* ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:93:1: ( 'DomoticSystem' ( (lv_name_1_0= RULE_ID ) ) ( (lv_package_2_0= rulePackage ) )? ';' ( (lv_properties_4_0= ruleProperties ) )? ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )* ( (lv_sensors_6_0= ruleSensor ) )* )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:93:1: ( 'DomoticSystem' ( (lv_name_1_0= RULE_ID ) ) ( (lv_package_2_0= rulePackage ) )? ';' ( (lv_properties_4_0= ruleProperties ) )? ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )* ( (lv_sensors_6_0= ruleSensor ) )* )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:93:3: 'DomoticSystem' ( (lv_name_1_0= RULE_ID ) ) ( (lv_package_2_0= rulePackage ) )? ';' ( (lv_properties_4_0= ruleProperties ) )? ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )* ( (lv_sensors_6_0= ruleSensor ) )*
            {
            match(input,12,FOLLOW_12_in_ruleSystem120); 

                    createLeafNode(grammarAccess.getSystemAccess().getDomoticSystemKeyword_0(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:97:1: ( (lv_name_1_0= RULE_ID ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:98:1: (lv_name_1_0= RULE_ID )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:98:1: (lv_name_1_0= RULE_ID )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:99:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSystem137); 

            			createLeafNode(grammarAccess.getSystemAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getSystemRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:121:2: ( (lv_package_2_0= rulePackage ) )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==14) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:122:1: (lv_package_2_0= rulePackage )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:122:1: (lv_package_2_0= rulePackage )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:123:3: lv_package_2_0= rulePackage
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getSystemAccess().getPackagePackageParserRuleCall_2_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_rulePackage_in_ruleSystem163);
                    lv_package_2_0=rulePackage();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSystemRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"package",
                    	        		lv_package_2_0, 
                    	        		"Package", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }
                    break;

            }

            match(input,13,FOLLOW_13_in_ruleSystem174); 

                    createLeafNode(grammarAccess.getSystemAccess().getSemicolonKeyword_3(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:149:1: ( (lv_properties_4_0= ruleProperties ) )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==15) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:150:1: (lv_properties_4_0= ruleProperties )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:150:1: (lv_properties_4_0= ruleProperties )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:151:3: lv_properties_4_0= ruleProperties
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getSystemAccess().getPropertiesPropertiesParserRuleCall_4_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleProperties_in_ruleSystem195);
                    lv_properties_4_0=ruleProperties();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSystemRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"properties",
                    	        		lv_properties_4_0, 
                    	        		"Properties", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }
                    break;

            }

            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:173:3: ( (lv_elettrodomestico_5_0= ruleElettrodomestico ) )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==16) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:174:1: (lv_elettrodomestico_5_0= ruleElettrodomestico )
            	    {
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:174:1: (lv_elettrodomestico_5_0= ruleElettrodomestico )
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:175:3: lv_elettrodomestico_5_0= ruleElettrodomestico
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getSystemAccess().getElettrodomesticoElettrodomesticoParserRuleCall_5_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleElettrodomestico_in_ruleSystem217);
            	    lv_elettrodomestico_5_0=ruleElettrodomestico();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getSystemRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"elettrodomestico",
            	    	        		lv_elettrodomestico_5_0, 
            	    	        		"Elettrodomestico", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);

            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:197:3: ( (lv_sensors_6_0= ruleSensor ) )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( (LA4_0==19) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:198:1: (lv_sensors_6_0= ruleSensor )
            	    {
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:198:1: (lv_sensors_6_0= ruleSensor )
            	    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:199:3: lv_sensors_6_0= ruleSensor
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getSystemAccess().getSensorsSensorParserRuleCall_6_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleSensor_in_ruleSystem239);
            	    lv_sensors_6_0=ruleSensor();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getSystemRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"sensors",
            	    	        		lv_sensors_6_0, 
            	    	        		"Sensor", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleSystem


    // $ANTLR start entryRulePackage
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:229:1: entryRulePackage returns [EObject current=null] : iv_rulePackage= rulePackage EOF ;
    public final EObject entryRulePackage() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePackage = null;


        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:230:2: (iv_rulePackage= rulePackage EOF )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:231:2: iv_rulePackage= rulePackage EOF
            {
             currentNode = createCompositeNode(grammarAccess.getPackageRule(), currentNode); 
            pushFollow(FOLLOW_rulePackage_in_entryRulePackage276);
            iv_rulePackage=rulePackage();
            _fsp--;

             current =iv_rulePackage; 
            match(input,EOF,FOLLOW_EOF_in_entryRulePackage286); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRulePackage


    // $ANTLR start rulePackage
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:238:1: rulePackage returns [EObject current=null] : ( 'package' ( (lv_name_1_0= RULE_STRING ) ) ) ;
    public final EObject rulePackage() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:243:6: ( ( 'package' ( (lv_name_1_0= RULE_STRING ) ) ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:244:1: ( 'package' ( (lv_name_1_0= RULE_STRING ) ) )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:244:1: ( 'package' ( (lv_name_1_0= RULE_STRING ) ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:244:3: 'package' ( (lv_name_1_0= RULE_STRING ) )
            {
            match(input,14,FOLLOW_14_in_rulePackage321); 

                    createLeafNode(grammarAccess.getPackageAccess().getPackageKeyword_0(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:248:1: ( (lv_name_1_0= RULE_STRING ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:249:1: (lv_name_1_0= RULE_STRING )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:249:1: (lv_name_1_0= RULE_STRING )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:250:3: lv_name_1_0= RULE_STRING
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePackage338); 

            			createLeafNode(grammarAccess.getPackageAccess().getNameSTRINGTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getPackageRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"STRING", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }


            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end rulePackage


    // $ANTLR start entryRuleProperties
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:280:1: entryRuleProperties returns [EObject current=null] : iv_ruleProperties= ruleProperties EOF ;
    public final EObject entryRuleProperties() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleProperties = null;


        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:281:2: (iv_ruleProperties= ruleProperties EOF )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:282:2: iv_ruleProperties= ruleProperties EOF
            {
             currentNode = createCompositeNode(grammarAccess.getPropertiesRule(), currentNode); 
            pushFollow(FOLLOW_ruleProperties_in_entryRuleProperties379);
            iv_ruleProperties=ruleProperties();
            _fsp--;

             current =iv_ruleProperties; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleProperties389); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleProperties


    // $ANTLR start ruleProperties
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:289:1: ruleProperties returns [EObject current=null] : ( 'propertiesPath=' ( (lv_name_1_0= RULE_STRING ) ) ';' ) ;
    public final EObject ruleProperties() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:294:6: ( ( 'propertiesPath=' ( (lv_name_1_0= RULE_STRING ) ) ';' ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:295:1: ( 'propertiesPath=' ( (lv_name_1_0= RULE_STRING ) ) ';' )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:295:1: ( 'propertiesPath=' ( (lv_name_1_0= RULE_STRING ) ) ';' )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:295:3: 'propertiesPath=' ( (lv_name_1_0= RULE_STRING ) ) ';'
            {
            match(input,15,FOLLOW_15_in_ruleProperties424); 

                    createLeafNode(grammarAccess.getPropertiesAccess().getPropertiesPathKeyword_0(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:299:1: ( (lv_name_1_0= RULE_STRING ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:300:1: (lv_name_1_0= RULE_STRING )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:300:1: (lv_name_1_0= RULE_STRING )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:301:3: lv_name_1_0= RULE_STRING
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleProperties441); 

            			createLeafNode(grammarAccess.getPropertiesAccess().getNameSTRINGTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getPropertiesRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"STRING", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,13,FOLLOW_13_in_ruleProperties456); 

                    createLeafNode(grammarAccess.getPropertiesAccess().getSemicolonKeyword_2(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleProperties


    // $ANTLR start entryRuleElettrodomestico
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:335:1: entryRuleElettrodomestico returns [EObject current=null] : iv_ruleElettrodomestico= ruleElettrodomestico EOF ;
    public final EObject entryRuleElettrodomestico() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleElettrodomestico = null;


        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:336:2: (iv_ruleElettrodomestico= ruleElettrodomestico EOF )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:337:2: iv_ruleElettrodomestico= ruleElettrodomestico EOF
            {
             currentNode = createCompositeNode(grammarAccess.getElettrodomesticoRule(), currentNode); 
            pushFollow(FOLLOW_ruleElettrodomestico_in_entryRuleElettrodomestico492);
            iv_ruleElettrodomestico=ruleElettrodomestico();
            _fsp--;

             current =iv_ruleElettrodomestico; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleElettrodomestico502); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleElettrodomestico


    // $ANTLR start ruleElettrodomestico
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:344:1: ruleElettrodomestico returns [EObject current=null] : ( 'Elettrodomestico' ( (lv_name_1_0= RULE_ID ) ) 'consumption=' ( (lv_consumption_3_0= ruleConsumption ) ) 'usage=' ( (lv_usage_5_0= ruleUsage ) ) ';' ) ;
    public final EObject ruleElettrodomestico() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Enumerator lv_consumption_3_0 = null;

        Enumerator lv_usage_5_0 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:349:6: ( ( 'Elettrodomestico' ( (lv_name_1_0= RULE_ID ) ) 'consumption=' ( (lv_consumption_3_0= ruleConsumption ) ) 'usage=' ( (lv_usage_5_0= ruleUsage ) ) ';' ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:350:1: ( 'Elettrodomestico' ( (lv_name_1_0= RULE_ID ) ) 'consumption=' ( (lv_consumption_3_0= ruleConsumption ) ) 'usage=' ( (lv_usage_5_0= ruleUsage ) ) ';' )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:350:1: ( 'Elettrodomestico' ( (lv_name_1_0= RULE_ID ) ) 'consumption=' ( (lv_consumption_3_0= ruleConsumption ) ) 'usage=' ( (lv_usage_5_0= ruleUsage ) ) ';' )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:350:3: 'Elettrodomestico' ( (lv_name_1_0= RULE_ID ) ) 'consumption=' ( (lv_consumption_3_0= ruleConsumption ) ) 'usage=' ( (lv_usage_5_0= ruleUsage ) ) ';'
            {
            match(input,16,FOLLOW_16_in_ruleElettrodomestico537); 

                    createLeafNode(grammarAccess.getElettrodomesticoAccess().getElettrodomesticoKeyword_0(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:354:1: ( (lv_name_1_0= RULE_ID ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:355:1: (lv_name_1_0= RULE_ID )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:355:1: (lv_name_1_0= RULE_ID )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:356:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleElettrodomestico554); 

            			createLeafNode(grammarAccess.getElettrodomesticoAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getElettrodomesticoRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,17,FOLLOW_17_in_ruleElettrodomestico569); 

                    createLeafNode(grammarAccess.getElettrodomesticoAccess().getConsumptionKeyword_2(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:382:1: ( (lv_consumption_3_0= ruleConsumption ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:383:1: (lv_consumption_3_0= ruleConsumption )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:383:1: (lv_consumption_3_0= ruleConsumption )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:384:3: lv_consumption_3_0= ruleConsumption
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getElettrodomesticoAccess().getConsumptionConsumptionEnumRuleCall_3_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleConsumption_in_ruleElettrodomestico590);
            lv_consumption_3_0=ruleConsumption();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getElettrodomesticoRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"consumption",
            	        		lv_consumption_3_0, 
            	        		"Consumption", 
            	        		currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }


            }

            match(input,18,FOLLOW_18_in_ruleElettrodomestico600); 

                    createLeafNode(grammarAccess.getElettrodomesticoAccess().getUsageKeyword_4(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:410:1: ( (lv_usage_5_0= ruleUsage ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:411:1: (lv_usage_5_0= ruleUsage )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:411:1: (lv_usage_5_0= ruleUsage )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:412:3: lv_usage_5_0= ruleUsage
            {
             
            	        currentNode=createCompositeNode(grammarAccess.getElettrodomesticoAccess().getUsageUsageEnumRuleCall_5_0(), currentNode); 
            	    
            pushFollow(FOLLOW_ruleUsage_in_ruleElettrodomestico621);
            lv_usage_5_0=ruleUsage();
            _fsp--;


            	        if (current==null) {
            	            current = factory.create(grammarAccess.getElettrodomesticoRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode.getParent(), current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"usage",
            	        		lv_usage_5_0, 
            	        		"Usage", 
            	        		currentNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	        currentNode = currentNode.getParent();
            	    

            }


            }

            match(input,13,FOLLOW_13_in_ruleElettrodomestico631); 

                    createLeafNode(grammarAccess.getElettrodomesticoAccess().getSemicolonKeyword_6(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleElettrodomestico


    // $ANTLR start entryRuleSensor
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:446:1: entryRuleSensor returns [EObject current=null] : iv_ruleSensor= ruleSensor EOF ;
    public final EObject entryRuleSensor() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleSensor = null;


        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:447:2: (iv_ruleSensor= ruleSensor EOF )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:448:2: iv_ruleSensor= ruleSensor EOF
            {
             currentNode = createCompositeNode(grammarAccess.getSensorRule(), currentNode); 
            pushFollow(FOLLOW_ruleSensor_in_entryRuleSensor667);
            iv_ruleSensor=ruleSensor();
            _fsp--;

             current =iv_ruleSensor; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleSensor677); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end entryRuleSensor


    // $ANTLR start ruleSensor
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:455:1: ruleSensor returns [EObject current=null] : ( 'Sensor' 'for' ( ( RULE_ID ) ) ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )? ';' ) ;
    public final EObject ruleSensor() throws RecognitionException {
        EObject current = null;

        Token lv_minConsumption_4_0=null;
        Token lv_maxConsumption_6_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:460:6: ( ( 'Sensor' 'for' ( ( RULE_ID ) ) ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )? ';' ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:461:1: ( 'Sensor' 'for' ( ( RULE_ID ) ) ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )? ';' )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:461:1: ( 'Sensor' 'for' ( ( RULE_ID ) ) ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )? ';' )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:461:3: 'Sensor' 'for' ( ( RULE_ID ) ) ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )? ';'
            {
            match(input,19,FOLLOW_19_in_ruleSensor712); 

                    createLeafNode(grammarAccess.getSensorAccess().getSensorKeyword_0(), null); 
                
            match(input,20,FOLLOW_20_in_ruleSensor722); 

                    createLeafNode(grammarAccess.getSensorAccess().getForKeyword_1(), null); 
                
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:469:1: ( ( RULE_ID ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:470:1: ( RULE_ID )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:470:1: ( RULE_ID )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:471:3: RULE_ID
            {

            			if (current==null) {
            	            current = factory.create(grammarAccess.getSensorRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
                    
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSensor740); 

            		createLeafNode(grammarAccess.getSensorAccess().getElettrodomesticoElettrodomesticoCrossReference_2_0(), "elettrodomestico"); 
            	

            }


            }

            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:483:2: ( 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) ) )?
            int alt5=2;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==21) ) {
                alt5=1;
            }
            switch (alt5) {
                case 1 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:483:4: 'minConsumption=' ( (lv_minConsumption_4_0= RULE_DOUBLE ) ) 'maxConsumption=' ( (lv_maxConsumption_6_0= RULE_DOUBLE ) )
                    {
                    match(input,21,FOLLOW_21_in_ruleSensor751); 

                            createLeafNode(grammarAccess.getSensorAccess().getMinConsumptionKeyword_3_0(), null); 
                        
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:487:1: ( (lv_minConsumption_4_0= RULE_DOUBLE ) )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:488:1: (lv_minConsumption_4_0= RULE_DOUBLE )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:488:1: (lv_minConsumption_4_0= RULE_DOUBLE )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:489:3: lv_minConsumption_4_0= RULE_DOUBLE
                    {
                    lv_minConsumption_4_0=(Token)input.LT(1);
                    match(input,RULE_DOUBLE,FOLLOW_RULE_DOUBLE_in_ruleSensor768); 

                    			createLeafNode(grammarAccess.getSensorAccess().getMinConsumptionDOUBLETerminalRuleCall_3_1_0(), "minConsumption"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSensorRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"minConsumption",
                    	        		lv_minConsumption_4_0, 
                    	        		"DOUBLE", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,22,FOLLOW_22_in_ruleSensor783); 

                            createLeafNode(grammarAccess.getSensorAccess().getMaxConsumptionKeyword_3_2(), null); 
                        
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:515:1: ( (lv_maxConsumption_6_0= RULE_DOUBLE ) )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:516:1: (lv_maxConsumption_6_0= RULE_DOUBLE )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:516:1: (lv_maxConsumption_6_0= RULE_DOUBLE )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:517:3: lv_maxConsumption_6_0= RULE_DOUBLE
                    {
                    lv_maxConsumption_6_0=(Token)input.LT(1);
                    match(input,RULE_DOUBLE,FOLLOW_RULE_DOUBLE_in_ruleSensor800); 

                    			createLeafNode(grammarAccess.getSensorAccess().getMaxConsumptionDOUBLETerminalRuleCall_3_3_0(), "maxConsumption"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSensorRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"maxConsumption",
                    	        		lv_maxConsumption_6_0, 
                    	        		"DOUBLE", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }


                    }
                    break;

            }

            match(input,13,FOLLOW_13_in_ruleSensor817); 

                    createLeafNode(grammarAccess.getSensorAccess().getSemicolonKeyword_4(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleSensor


    // $ANTLR start ruleConsumption
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:551:1: ruleConsumption returns [Enumerator current=null] : ( ( 'LOW' ) | ( 'MEDIUM' ) | ( 'HIGH' ) ) ;
    public final Enumerator ruleConsumption() throws RecognitionException {
        Enumerator current = null;

         setCurrentLookahead(); resetLookahead(); 
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:555:6: ( ( ( 'LOW' ) | ( 'MEDIUM' ) | ( 'HIGH' ) ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:556:1: ( ( 'LOW' ) | ( 'MEDIUM' ) | ( 'HIGH' ) )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:556:1: ( ( 'LOW' ) | ( 'MEDIUM' ) | ( 'HIGH' ) )
            int alt6=3;
            switch ( input.LA(1) ) {
            case 23:
                {
                alt6=1;
                }
                break;
            case 24:
                {
                alt6=2;
                }
                break;
            case 25:
                {
                alt6=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("556:1: ( ( 'LOW' ) | ( 'MEDIUM' ) | ( 'HIGH' ) )", 6, 0, input);

                throw nvae;
            }

            switch (alt6) {
                case 1 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:556:2: ( 'LOW' )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:556:2: ( 'LOW' )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:556:4: 'LOW'
                    {
                    match(input,23,FOLLOW_23_in_ruleConsumption865); 

                            current = grammarAccess.getConsumptionAccess().getLOWEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                            createLeafNode(grammarAccess.getConsumptionAccess().getLOWEnumLiteralDeclaration_0(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:562:6: ( 'MEDIUM' )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:562:6: ( 'MEDIUM' )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:562:8: 'MEDIUM'
                    {
                    match(input,24,FOLLOW_24_in_ruleConsumption880); 

                            current = grammarAccess.getConsumptionAccess().getMEDIUMEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                            createLeafNode(grammarAccess.getConsumptionAccess().getMEDIUMEnumLiteralDeclaration_1(), null); 
                        

                    }


                    }
                    break;
                case 3 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:568:6: ( 'HIGH' )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:568:6: ( 'HIGH' )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:568:8: 'HIGH'
                    {
                    match(input,25,FOLLOW_25_in_ruleConsumption895); 

                            current = grammarAccess.getConsumptionAccess().getHIGHEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
                            createLeafNode(grammarAccess.getConsumptionAccess().getHIGHEnumLiteralDeclaration_2(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleConsumption


    // $ANTLR start ruleUsage
    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:578:1: ruleUsage returns [Enumerator current=null] : ( ( 'ESSENTIAL' ) | ( 'OPTIONAL' ) ) ;
    public final Enumerator ruleUsage() throws RecognitionException {
        Enumerator current = null;

         setCurrentLookahead(); resetLookahead(); 
        try {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:582:6: ( ( ( 'ESSENTIAL' ) | ( 'OPTIONAL' ) ) )
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:583:1: ( ( 'ESSENTIAL' ) | ( 'OPTIONAL' ) )
            {
            // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:583:1: ( ( 'ESSENTIAL' ) | ( 'OPTIONAL' ) )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0==26) ) {
                alt7=1;
            }
            else if ( (LA7_0==27) ) {
                alt7=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("583:1: ( ( 'ESSENTIAL' ) | ( 'OPTIONAL' ) )", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:583:2: ( 'ESSENTIAL' )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:583:2: ( 'ESSENTIAL' )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:583:4: 'ESSENTIAL'
                    {
                    match(input,26,FOLLOW_26_in_ruleUsage938); 

                            current = grammarAccess.getUsageAccess().getESSENTIALEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                            createLeafNode(grammarAccess.getUsageAccess().getESSENTIALEnumLiteralDeclaration_0(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:589:6: ( 'OPTIONAL' )
                    {
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:589:6: ( 'OPTIONAL' )
                    // ../domotica.dsl/src-gen/it/unibo/iss/domotica/parser/antlr/internal/InternalDomoticDsl.g:589:8: 'OPTIONAL'
                    {
                    match(input,27,FOLLOW_27_in_ruleUsage953); 

                            current = grammarAccess.getUsageAccess().getOPTIONALEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                            createLeafNode(grammarAccess.getUsageAccess().getOPTIONALEnumLiteralDeclaration_1(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleUsage


 

    public static final BitSet FOLLOW_ruleSystem_in_entryRuleSystem75 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleSystem85 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_12_in_ruleSystem120 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSystem137 = new BitSet(new long[]{0x0000000000006000L});
    public static final BitSet FOLLOW_rulePackage_in_ruleSystem163 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleSystem174 = new BitSet(new long[]{0x0000000000098002L});
    public static final BitSet FOLLOW_ruleProperties_in_ruleSystem195 = new BitSet(new long[]{0x0000000000090002L});
    public static final BitSet FOLLOW_ruleElettrodomestico_in_ruleSystem217 = new BitSet(new long[]{0x0000000000090002L});
    public static final BitSet FOLLOW_ruleSensor_in_ruleSystem239 = new BitSet(new long[]{0x0000000000080002L});
    public static final BitSet FOLLOW_rulePackage_in_entryRulePackage276 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRulePackage286 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_14_in_rulePackage321 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_rulePackage338 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleProperties_in_entryRuleProperties379 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleProperties389 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_15_in_ruleProperties424 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleProperties441 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleProperties456 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleElettrodomestico_in_entryRuleElettrodomestico492 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleElettrodomestico502 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_16_in_ruleElettrodomestico537 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleElettrodomestico554 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_ruleElettrodomestico569 = new BitSet(new long[]{0x0000000003800000L});
    public static final BitSet FOLLOW_ruleConsumption_in_ruleElettrodomestico590 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_18_in_ruleElettrodomestico600 = new BitSet(new long[]{0x000000000C000000L});
    public static final BitSet FOLLOW_ruleUsage_in_ruleElettrodomestico621 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleElettrodomestico631 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleSensor_in_entryRuleSensor667 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleSensor677 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_19_in_ruleSensor712 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_ruleSensor722 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSensor740 = new BitSet(new long[]{0x0000000000202000L});
    public static final BitSet FOLLOW_21_in_ruleSensor751 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleSensor768 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_22_in_ruleSensor783 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_DOUBLE_in_ruleSensor800 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleSensor817 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_ruleConsumption865 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_24_in_ruleConsumption880 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_25_in_ruleConsumption895 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_ruleUsage938 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_ruleUsage953 = new BitSet(new long[]{0x0000000000000002L});

}